package io.renren.service;

import com.alibaba.fastjson.JSONObject;
import io.renren.annotation.LoginUser;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.common.utils.Result;
import io.renren.dto.SmallCanteenPurchaseDTO;
import io.renren.dto.StockOrderDTO;
import io.renren.entity.SmallCanteenPurchaseEntity;
import io.renren.entity.UserEntity;

import java.util.List;
import java.util.Map;

/**
 * 小食堂采购表
 *
 * @author 翟文闯 619556390@QQ.com
 * @since 1.0.0 2019-11-22
 */
public interface SmallCanteenPurchaseService extends CrudService<SmallCanteenPurchaseEntity, SmallCanteenPurchaseDTO> {
    //生成小食堂订单
    void saveAuxiliaryOrder(JSONObject params,UserEntity entity);

    SmallCanteenPurchaseDTO get(long id);

    List<SmallCanteenPurchaseDTO> home(Map<String, Object> params);

    Result updateExamine(SmallCanteenPurchaseDTO dto, UserEntity userEntity);
    Result UpdateSupplierOrder(SmallCanteenPurchaseDTO dto, UserEntity userEntity);


    PageData<SmallCanteenPurchaseDTO> pageAdmin(Map<String, Object> params);

    PageData<SmallCanteenPurchaseDTO> pagesTorehouseClerk(Map<String, Object> params, @LoginUser UserEntity entity);

    //小食堂订单
    Map selecSupplierSmallOrder(Long supplierId);
   //主厨的订单
    PageData<SmallCanteenPurchaseDTO>  getOrder(Map<String, Object> params, @LoginUser UserEntity entity);
    //查询订单未处理的状态
    SmallCanteenPurchaseDTO getTotal( Long chenid,Long clerkId,Long canteenId,int status);
}